<div class="layuimini-main">

    <div class="layui-form layuimini-form">

        <input type="hidden" id="reqUrl">
        <input type="hidden" id="reqType">
        <input type="hidden" id="tableName">
        <input type="hidden" id="projectId" name="projectId" value="${projectId}">
        <input type="hidden" id="hasExtend" value="true">

        <div class="layui-form-item">
            <label class="layui-form-label required">连接名</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="required" lay-reqtext="连接名不能为空" placeholder="请输入连接名" value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">数据库品牌</label>
            <div class="layui-input-inline">
                <select name="brand" lay-filter="brand" lay-verify="required" lay-reqtext="请选择数据库品牌">
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">地址</label>
            <div class="layui-input-block">
                <input type="text" name="mainAddr" lay-verify="required" lay-reqtext="地址不能为空" placeholder="请输入地址" value="" class="layui-input">
                <tip>确保数据库地址能够被当前服务访问，例：127.0.0.1:3306</tip>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">库、目录</label>
            <div class="layui-input-block">
                <input type="text" name="schema" lay-verify="required" lay-reqtext="库、目录不能为空" placeholder="请输入库或目录" value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">链接后缀</label>
            <div class="layui-input-block">
                <input type="text" name="urlSuffix" placeholder="请输入链接后缀" value="" class="layui-input">
                <tip>如：serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true</tip>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">用户名</label>
            <div class="layui-input-block">
                <input type="text" name="account" lay-verify="required" lay-reqtext="用户名不能为空" placeholder="请输入用户名" value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">密码</label>
            <div class="layui-input-block">
                <input type="password" name="password" lay-verify="required" lay-reqtext="密码不能为空" placeholder="请输入密码" value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">忽略前缀</label>
            <div class="layui-input-block">
                <input type="text" name="prefix" placeholder="请输入忽略前缀" value="" class="layui-input">
                <tip>忽略表头，如：tb_,sys_</tip>
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">扩展配置</label>
            <div class="layui-input-block">
                <div id="extendDiv" lay-filter="extendDiv"></div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
            </div>
        </div>
    </div>
</div>
<script src="/js/common/subTable.js"></script>
<script src="/js/biz/datasource/add.js"></script>
<script src="/js/common/save.js"></script>